You can use this function to convert a Number or Currency field value or the result of a numeric calculation to words so it can be used as text. The ability to adjust the number of decimal places can be useful when the number is the result of a calculation that may produce more decimal places than you want.
You can use this function to spell out the dollar amount for each check if you are using computer checks.
The following examples are applicable to both Basic and Crystal syntax:
Returns twelve thousand three hundred forty
Returns twelve thousand three hundred forty
Returns twelve thousand three hundred forty
Returns twelve thousand three hundred forty six.
Returns negative twelve thousand three hundred forty
ToWords({orders.ORDER AMOUNT})
Returns two thousand sixteen and 84/100 where Amount = 2016.84.
ToWords((({file.QTY1} + {file.QTY2} + {file.QTY3}) * {file.PRICE}) * 1.075)
Returns one hundred two and 13/100.
ToWords((({file.QTY1} + {file.QTY2} + {file.QTY3}) * {file.PRICE}) * 1.075,0)
Returns one hundred two where QTY1 = 1, QTY2 = 82, QTY3 = 12, and Price = 1.00 (sums three quantities, multiplies them times the price and adds 7.5% sales tax). In this case the numeric answer is 102.125 which is then rounded to 102.13 (the standard two decimal places) before putting into words.
Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |